<template>
  <div id="love_list" style="position: relative;">
    <c-title :hide="false" text="释放订单"></c-title>
    <div class="background_box"></div>
    <van-tabs v-model="selected" @click="switchItem">
      <van-tab  title="释放积分订单"></van-tab>
      <van-tab  title="释放余额订单"></van-tab>
    </van-tabs>
    <div style="margin: 0 16px;">
      <div class="coupon_card">
        <!--全部 v-show="selected==0"-->
        <div v-show="selected==0">
          <template v-if="!fun.isTextEmpty(allData)">
            <div class="tbs" v-for="(item, index) in allData.point" :key="index">
              <div class="left titles">
                <div>{{ item.give_point }}</div>
                <div style="margin-left: 10px;">{{ getTpyeText(item.status) }}</div>
              </div>
              <div class="right">
                总释放次数: {{ item.total_sfcs }}
              </div>
              <div class="left titles">
                已释放积分： {{ item.ysf_point }} 
              </div>
              <div class="right">
                已释放次数: {{ item.ysfcs }}
              </div>
              <div style=" width: 100%; text-align: left;">
                <div>释放规则:</div>                
              </div>

              <div style="width: 100%; display: flex; flex-direction: column;">
                <div v-for="citem in JSON.parse(JSON.parse(item.rule))">
                  释放{{ citem.sfts }}天,每天{{ citem.sfjf }}积分
                </div>                
              </div>
            </div>
          </template>
        </div>
        <div v-show="selected==1">
          <template v-if="!fun.isTextEmpty(allData)">
            <div class="tbs" v-for="(item, index) in allData.yue" :key="index">
              <div class="left titles">
                <div>{{ item.give_point }}</div>
                <div style="margin-left: 10px;">{{ getTpyeText(item.status) }}</div>
              </div>
              <div class="right">
                总释放次数: {{ item.total_sfcs }}
              </div>
              <div class="left titles">
                已释放积分： {{ item.ysf_point }} 
              </div>
              <div class="right">
                已释放次数: {{ item.ysfcs }}
              </div>
              <div style=" width: 100%; text-align: left;">
                <div>释放规则:</div>                
              </div>

              <div style="width: 100%; display: flex; flex-direction: column;">
                <div v-for="citem in JSON.parse(JSON.parse(item.rule))">
                  释放{{ citem.sfts }}天,每天{{ citem.sfjf }}积分
                </div>                
              </div>
            </div>
          </template>
        </div>
      </div>
    </div>
    

  </div>
</template>
<script>
import shifang_order_controller from './shifang_order_controller';

export default shifang_order_controller;
</script>

<style lang="scss" rel="stylesheet/scss" scoped>
#love_list .mint-cell-value {
  width: 100% !important;
}
.background_box {
    color: #382c0a;
    background-color: #fff;
    background-image: -webkit-gradient(linear, left top, left bottom, from(var(--themeBaseColor)), to(#f5f5f5));
    background-image: -webkit-linear-gradient(var(--themeBaseColor), #f5f5f5);
    background-image: linear-gradient(var(--themeBaseColor), #f5f5f5);
    min-height: 12.125rem;
    padding: 1.5938rem 1.0938rem 0 1.0938rem;
    position: absolute;
    z-index: -1;
    width: 100%;
  }
.tbs {
  display: flex;
  align-items: center;
  background: #fff;
  flex-flow: row wrap;
  border-bottom: #ebebeb 0.0625rem solid;
  padding: 0.625rem 0.75rem;
  box-sizing: border-box;
  // color: #8c8c8c;
  font-size: 14px;

  .list-mark {
    color: #8c8c8c;
    font-size: 0.75rem;
    text-align: left;
  }

  .left {
    line-height: 1.5rem;
    flex: 50%;
    text-align: left;
    font-size: 12px;
  }

  .right {
    line-height: 1.5rem;
    flex: 50%;
    text-align: right;
  }

  .titles {
    font-size: 14px;
    color: #333;
    line-height: 1.5rem;
    display: flex;
    width: 100%;
    overflow: hidden;

    .source-name {
      margin-right: 0.5rem;
    }

    .remark {
      flex: 1;
      font-size: 0.75rem;
      color: #999;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }

  .reds {
    color: #f15353;
    line-height: 1.5rem;
    font-size: 12px;

    small {
      font-size: 14px;
    }
  }
}

.right {
  line-height: 1.5rem;
  flex: 50%;
  text-align: right;
}

.titles {
  font-size: 14px;
  color: #333;
  line-height: 1.5rem;
}

.reds {
  color: #f15353;
  line-height: 1.5rem;
  font-size: 14px;

  small {
    font-size: 14px;
  }
}


p {
  margin: 0;
  padding: 0;
  vertical-align: baseline;
}



.coupon_card,
.coupon_info {
  margin: 0.625rem 0 0;
  width: 100%;

  .coupon_voucher {
    margin-bottom: 0.625rem;
    position: relative;
    -webkit-transition: -webkit-transform 0.5s ease-in-out;
    transition: -webkit-transform 0.5s ease-in-out;
    transition: transform 0.5s ease-in-out;
    transition: transform 0.5s ease-in-out, -webkit-transform 0.5s ease-in-out;
    padding-left: 0;

    .coupon_voucher_main {
      position: relative;
      padding-left: 6.375rem;
      height: 6.875rem;
      width: 100%;
      box-sizing: border-box;

      .coupon_voucher_left {
        position: absolute;
        top: 0;
        left: 0;
        width: 6.375rem;
        height: 100%;
        color: #fff;
        border-radius: 0.25rem 0 0 0.25rem;
        text-align: center;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;

        .coupon_voucher_amount {
          position: relative;
          font-size: 32px;
          line-height: 2rem;
        }

        .coupon_voucher_amount::before {
          content: "\00A5";
          font-size: 16px;
          display: inline-block;
          vertical-align: text-top;
          margin-right: 0.1875rem;
        }

        .coupon_voucher_limit {
          font-size: 12px;
        }
      }

      .coupon_voucher_hr {
        position: absolute;
        top: 0;
        left: 6.0625rem;
        width: 0.375rem;
        overflow: hidden;
        height: 100%;
      }

      .coupon_voucher_hr::after {
        box-sizing: border-box;
        position: absolute;
        top: -0.1875rem;
        right: -0.1875rem;
        bottom: 0;
        content: "• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •";
        line-height: 0.625rem;
        width: 0.4375rem;
        color: #f8fbfb;
        font-size: 18px;
        overflow: hidden;
        z-index: 1;
      }

      .coupon_voucher_right {
        padding: 0.9375rem 0.9375rem 0.9375rem 0.625rem;
        height: 100%;
        border-radius: 0 0.25rem 0.25rem 0;
        background-color: #f8fbfb;
        color: #666;
        width: 100%;
        box-sizing: border-box;
        //              float: right;
        position: relative;

        .coupon_voucher_range {
          overflow: hidden;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          font-size: 12px;
          text-align: left;
        }

        .coupon_voucher_btn.bg_1 {
          color: #3985ff;
          z-index: 111;
          background-color: #3985ff;
          border: 0.0625rem solid #3985ff;
          background: none;
          border-color: #3985ff;
          border-radius: 0.625rem;
          font-size: 12px;
        }

        .coupon_voucher_btn.bg_1::after {
          border-color: #3985ff;
        }

        .coupon_voucher_more_arr {
          display: inline-block;
          vertical-align: middle;
          margin-top: -0.125rem;
          margin-left: 0.3125rem;
          width: 0.75rem;
          height: 0.75rem;

          /* background: url(…zqJV2ttTR8uaPvmc9AmL2S87lc2YzIy3/ieHyx4J7zexZON0gP9cnwmkcAAAAASUVORK5CYII=) 50% no-repeat; */
          background-size: 12px auto;
          -webkit-transition: -webkit-transform 0.5s ease-in-out;
          transition: -webkit-transform 0.5s ease-in-out;
          transition: transform 0.5s ease-in-out;
          transition: transform 0.5s ease-in-out, -webkit-transform 0.5s ease-in-out;
          border: 0.0625rem solid #999;
          border-radius: 0.75rem;
        }
      }
    }

    .coupon_voucher_btm {
      display: none;
      position: relative;
      box-sizing: border-box;
      padding: 0.5rem 0.625rem;
      background-color: #f2f2f7;
      border-radius: 0.1875rem;

      .coupon_voucher_explain {
        color: #999;
        font-size: 12px;
        text-align: left;
      }
    }

    .coupon_voucher_btm.hies {
      display: block;
    }
  }
}
</style>
